<?php

namespace Drupal\ssy_live_room\MetadataController;

class SsyLiveRoomMetadataController extends \EntityDefaultMetadataController {

  public function entityPropertyInfo() {
    $info = parent::entityPropertyInfo();
    $properties = &$info[$this->type]['properties'];
    $properties['user'] = [
      'label' => t('所有人'),
      'type' => 'user',
      'schema field' => 'uid',
      'description' => t('所有人.'),
    ];
    $properties['op_user'] = [
      'label' => t('操作人'),
      'type' => 'user',
      'schema field' => 'op_uid',
      'description' => t('操作人.'),
    ];

    $properties['created'] = [
      'label' => t('记录时间'),
      'type' => 'date',
      'schema field' => 'created',
      'description' => t('记录时间.'),
    ];
    $properties['changed'] = [
      'label' => t('变化时间'),
      'type' => 'date',
      'schema field' => 'changed',
      'description' => t('变化时间.'),
    ];

    $properties['start_time'] = [
      'label' => t('开始时间'),
      'type' => 'date',
      'schema field' => 'start_time',
      'description' => t('开始时间.'),
    ];
    $properties['end_time'] = [
      'label' => t('结束时间'),
      'type' => 'date',
      'schema field' => 'end_time',
      'description' => t('结束时间.'),
    ];

    return $info;
  }
}
